import Vue from 'vue'
import VueRouter from 'vue-router'
import HealthViews from '../views/HealthViews.vue'
import SalaryViews from '../views/SalaryViews.vue'
import ModeTrain from '../views/ModeTrain.vue'

Vue.use(VueRouter)

const routes = [
  // 解决首页空白显示问题，代码解释：跟路径重定向到/healthViews
  {
    path: '/',
    redirect: '/healthViews'
  },
  {
    path: '/healthViews',
    component: HealthViews
  },
  {
    path: '/salaryViews',
    component: SalaryViews
  },
  {
    path: '/modeTrain',
    component: ModeTrain
  }
]

const router = new VueRouter({
  routes
})

export default router
